package lab02.test36;

public class Undergraduate extends Student {


    @Override
    double AverageScore() {
        double sum=0;
        for(Double score:score){
            sum=sum+score;
        }
        return averageScore=sum/3;
    }

    @Override
    String LetterGrades() {
        if (averageScore < 50) {
           scoreClass = "不及格";
        } else if (averageScore >= 50 && averageScore <= 60) {
       scoreClass="及格";
        } else if (averageScore > 60 && averageScore <= 70) {
            scoreClass="一般";
        } else if (averageScore > 70 && averageScore <= 80) {
           scoreClass="良好";
        } else if (averageScore > 80 && averageScore <= 100) {
            scoreClass="优秀";
        }

        return scoreClass;
    }
}
